home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 April / EnigmA AMIGA RUN 17 (1997)(G.R. Edizioni)(IT)[!][issue 1997-04][EAR-CD].iso / EARCD / comm / bbs / Hydra11s.lha / HBBS / Source / Oberon / BBSStructures.mod < prev    next >
Text File  |  1996-07-06  |  28KB  |  675 lines

  1. MODULE BBSStructures;
  2.  
  3. IMPORT e:= Exec, bc:= BBSConstants, s:= SYSTEM, Timer, Serial, Intuition;
  4.  
  5. TYPE
  6.     ScreenInfoDataPtr* = UNTRACED POINTER TO ScreenInfoData;
  7.     ScreenInfoData* = STRUCT
  8.     Scr: Intuition.ScreenPtr;
  9.     ScrModeID*: LONGINT;
  10.     ScrWidht*: LONGINT;
  11.     ScrHeight*: LONGINT;
  12.     ScrDepth*: LONGINT;
  13.     PubScreenName*: e.STRPTR;
  14.     UsePubScreen*: e.LONGBOOL;
  15.     END;
  16.  
  17.     (* right, it is sooo cooool, basically a door calls the MenuPrompt function
  18.        like this:
  19.        DOORMenuPrompt(s.ADR("Fruit [O]ranges, [B]ananas, [A]pples"), "B");
  20.        where the B means that Banana's will be selected if the user just press return
  21.        then using the data in BBSColors we can change the output of the prompt
  22.        passed to MenuPrompt before we display it, here's an example of what
  23.        each setting might be set to... *)
  24.  
  25.     BBSColsDataPtr* = UNTRACED POINTER TO BBSColsData;
  26.     BBSColsData* = STRUCT
  27.     MenuTextANSI*: e.STRPTR;        (* default: white *)
  28.     MenuOpenBracket*: e.STRPTR;     (* default: blue + "[" *)
  29.     MenuCloseBracket*: e.STRPTR;    (* default: blue + "]" *)
  30.     MenuHighlightANSI*: e.STRPTR;   (* default: yellow *)
  31.     MenuDefaultOptANSI*: e.STRPTR;  (* default: bold + white *)
  32.     MenuPromptANSI*: e.STRPTR;      (* default: blue + ":" *)
  33.     END;
  34.  
  35.     BoolNodePtr* = UNTRACED POINTER TO BoolNode;
  36.     BoolNode* = STRUCT (node*: e.Node)
  37.     Boolean*: e.LONGBOOL;
  38.     END;
  39.  
  40.     ConfAcsDataPtr* = UNTRACED POINTER TO ConfAcsDataPtr;
  41.     ConfAcsData* = STRUCT
  42.     Name*: e.STRPTR;
  43.     See*: e.ListPtr; (* list of BoolNode *)
  44.     Access*: e.ListPtr;  (* list of BoolNode *)
  45.     END;
  46.  
  47.     (* when a user joins a conf first copy the correct access settings from
  48.        the list of access settings in BBSGlobal^.AcsList (HBBS:Access/Level_XX
  49.        to Node^.User.Acs then overwrite this data using UpdateAcs(dest, new)
  50.        with the settings for the Node^.Acs (NodeX/Access/Level_XX)
  51.        then override these settings with the access settings from
  52.        the conference itself (Conf/Access/Level_XX) and finally
  53.        override these settings with the users own access settings *)
  54.  
  55.     ConfDataPtr* = UNTRACED POINTER TO ConfData;
  56.     ConfData* = STRUCT (node*: e.Node) (* conference data is a linked list *)
  57.     (* the conference's name is stored in node^.name and loaded from
  58.         ConfName in the ConfConfig config file
  59.         makes it cool for intuition based utils (nukers ?) *)
  60.     ConfNum-: LONGINT;          (* filled in by control *)
  61.     ConfActive-: e.LONGBOOL;    (* if set you may use the conference
  62.                        possible use is for cd-rom based conferences
  63.                        you could write a door to de-activate
  64.                        a conference if the cd was taken out
  65.                        (but make sure there is NO users in the conf
  66.                        when you modify this value *)
  67.     ConfAccess-: LONGINT;       (* access required to enter conference *)
  68.     ConfPath-: e.STRPTR;        (* public: path of the conference *)
  69.     HoldFileList-: e.STRPTR;    (* path and file name of files that hold the list
  70.                        or privately uploaded files *)
  71.     HoldFiles-: e.ListPtr;      (* path(s) to above files *)
  72.     BadFileList-: e.STRPTR;     (* same for bad/corrupt files *)
  73.     BadFiles-: e.ListPtr;
  74.     PartUpload-: e.ListPtr;     (* path for uploaded files that were not completed *)
  75.     FileList-: e.ListPtr;       (* file listings *)
  76.     FileLists-: LONGINT;        (* contains amount of file lists *)
  77.     Upload-: e.ListPtr;         (* path for uploaded files to go to *)
  78.     Download-: e.ListPtr;       (* path to download files from *)
  79.     MaxDIZLines-: LONGINT;      (* max lines for the file description *)
  80.     MenuPrompt*: e.STRPTR;      (* prompt for the menu *)
  81.     AutoMailScan-: e.LONGBOOL;  (* automatic mail scan ? *)
  82.     ConfPassWD-: e.STRPTR;      (* conference password *)
  83.     UserAllowed-: e.ListPtr;    (* list of users allowed, or NIL
  84.                        if you want to allow every user to use the conf *)
  85.     KeepDIZWithFile-: e.LONGBOOL;(* if set it'll copy the FILE_ID.DIZ to
  86.                        the directory as the file itself is stored
  87.                        it's still kept in the archive too short! *)
  88.     END;
  89.  
  90.     (* define all data needed for the device for the node *)
  91.     DeviceDataPtr* = UNTRACED POINTER TO DeviceData;
  92.     DeviceData* = STRUCT
  93.     SysopNode*: e.LONGBOOL;     (* gets set to LTRUE if the device file
  94.                        does not exist in the Nodes/NodeX/ directory
  95.                        this determinate wether we open the serial port *)
  96.     (* following settings are defined in NodeX/device *)
  97.     DeviceName*: e.STRPTR;      (* as in name of modem rather than amiga .device *)
  98.     SerialDevice*: e.STRPTR;    (* path/name of .device file *)
  99.     SerialUnit*: LONGINT;
  100.     SerialBaud*: LONGINT;       (* baud rate *)
  101.     ModemDebug*: e.LONGBOOL;    (* show input/output to and from modem commands *)
  102.     ModemLog*: e.LONGBOOL;      (* log all input/output of modem commands *)
  103.  
  104.     EchoRetries*: LONGINT;
  105.     ReOpenRetries*: LONGINT;
  106.     ReOpenDelay*: LONGINT;
  107.     LockUpScript*: e.STRPTR;
  108.  
  109.     MaxCommandWait*: LONGINT;
  110.     CommandRetries*: LONGINT;
  111.     DelayBetweenCmds*: LONGINT;
  112.     TildeDelay*: LONGINT;
  113.  
  114.     TurnOnEcho*: e.ListPtr;
  115.     TurnOnEchoDelay*: LONGINT;
  116.  
  117.     ModemInit*: e.ListPtr;
  118.  
  119.     StrictConnect*: e.LONGBOOL;
  120.     StrictConnectStr*: e.ListPtr;
  121.     RelaxedConnectStr*: e.ListPtr;
  122.  
  123.     CommandModeString*: e.ListPtr;
  124.     DropDTRHangup*: e.LONGBOOL;
  125.     HangUpString*: e.STRPTR;
  126.     OffHookString*: e.STRPTR;
  127.     Incoming*: e.STRPTR;
  128.     ImmediateAnswer*: e.STRPTR;
  129.     NullModemCable*: e.LONGBOOL;    (* show input/output to and from modem commands *)
  130.     END;
  131.  
  132.     NodeSettingsDataPtr* = UNTRACED POINTER TO NodeSettingsData;
  133.     NodeSettingsData* = STRUCT
  134.     (* these settings are always in memory, even when a node is closed
  135.        (for stuff like lastcallers utils to examine *)
  136.     SysopAccount*: e.STRPTR;
  137.     NodeName*: e.STRPTR;
  138.     NodePhone*: e.STRPTR;
  139.     NodeConnectScript*: e.STRPTR;
  140.  
  141.     AskUserPW*: e.LONGBOOL;
  142.  
  143.     UseSysPW*: e.LONGBOOL;
  144.     SysPW*: e.STRPTR;
  145.     SysPWScript*: e.STRPTR;
  146.     SysPWPrompt*: e.STRPTR;
  147.  
  148.     UseNodePW*: e.LONGBOOL;
  149.     NodePW*: e.STRPTR;
  150.     NodePWScript*: e.STRPTR;
  151.     NodePWPrompt*: e.STRPTR;
  152.  
  153.     UserNamePrompt*: e.STRPTR;
  154.     UserPWPrompt*: e.STRPTR;
  155.  
  156.     NodeLogFile*: e.STRPTR;
  157.     ModemLogFile*: e.STRPTR;
  158.     CallersLogFile*: e.STRPTR;
  159.     DoorLogFile*: e.STRPTR;
  160.     DoorLog: e.LONGBOOL;
  161.     UploadLog*: e.LONGBOOL;
  162.     DownloadLog*: e.LONGBOOL;
  163.  
  164.     ChatFlag*: e.LONGBOOL;
  165.     Iconified*: e.LONGBOOL;
  166.     UseOwnScreen*: e.LONGBOOL;
  167.     StartScreen*: e.LONGBOOL;
  168.  
  169.     ScrModeID*: LONGINT;
  170.     ScrWidth*: LONGINT;
  171.     ScrHeight*: LONGINT;
  172.     ScrDepth*: LONGINT;
  173.  
  174.     AccessRequired*: LONGINT;
  175.  
  176.     UseDevice*: e.LONGBOOL;
  177.     AllowNewUsers*: e.LONGBOOL; (* set to LTRUE if you want new users to join *)
  178.  
  179.     NodePlayPen*: e.STRPTR;
  180.     MaxDIZLines*: LONGINT; (* default max diz lines, it gets copied to NnD^.MaxDizLines *)
  181.     (* Much more to come... *)
  182.     END;
  183.  
  184.     (* structure for time access data, see BBSGlobal^.TimeList for linked list of these *)
  185.  
  186.     TimeAccessDataPtr* = UNTRACED POINTER TO TimeAccessData;
  187.     TimeAccessData* = STRUCT (node*: e.Node)
  188.     (* node^.name contains the filename from which the data was loaded
  189.        so that the filename in the users user.data is matched to node^.name
  190.        to find the right one, rather than searching/loading it every time
  191.        a user logs on *)
  192.     Times*: ARRAY 7, 24 OF e.LONGBOOL;
  193.     END;
  194.  
  195. (*
  196.    times between 1:00am and 12:59pm
  197.     AM          PM
  198.     1         111         11
  199.     212345678901212345678901         a + here means a user can login during that
  200.     Mon +++++++++---------++++++         hour above the +, a - means the user is
  201.  d  Tue +++++++++---------++++++         NOT allowed to login..
  202.  a  Wed +++++++++---------++++++
  203.  y  Thu +++++++++---------++++++         so in this example the user would be able
  204.     Fri +++++++++---------++++++         to login between 12:00am and 8:59am and
  205.     Sat ++++++++++++++++++++++++         between 6:00pm and 11:59pm except on the
  206.     Sun ++++++++++++++++++++++++         weekend where they can login at anytime..
  207.     NIGHT     DAY      NIGHT
  208.                      cool huh ?
  209.     *)
  210.  
  211.     AccessDataPtr* = UNTRACED POINTER TO AccessData;
  212.     AccessData* = STRUCT
  213.     AccessLevel*: LONGINT;
  214.     Data*: ARRAY bc.MaxAccessSettings OF CHAR;
  215.     END;
  216.  
  217.     (* this is the format of the user.data file :-) no more hunting and
  218.        hacking to find it out! yeah !!
  219.        when memory is allocated for the userdata it should be cleared
  220.        so that when it si written to the end or back to the user.data file
  221.        it does not contain any garbage characters that would appear otherwise *)
  222.     UserDataPtr* = UNTRACED POINTER TO UserData;
  223.     UserData* = STRUCT
  224.     (* note: user's don't have any form of ID based upon position in the file
  225.        but they do have ID, which is their unique number that will always
  226.        be the same, even if the userdata file is tieded *)
  227.     UserID*: LONGINT; (* when a user joins the system they are given a number
  228.                  this number is BBSGlobal^.LastUserNum + 1
  229.                  this number is garunteed to be unique as this
  230.                  number goes up one everytime a new user is added
  231.                  to the user data file, but never goes down *)
  232.     Status*: CHAR;     (* see HBBSContants.User#? *)
  233.                (* "N" for new user       the user is a new user
  234.                   "V" for validated      the sysop has validated the user
  235.                   "D" for deleted        the sysop deleted the account
  236.                   "I" for inactive       the account became inactive
  237.                   "L" for logins denied  user is not allowed to login
  238.                   "O" for overwritable   set if you want this account
  239.                   be erased by a new account *)
  240.     Access*: LONGINT;   (* defines the users access level *)
  241.     Handle*:           ARRAY bc.LenHandle + 1 OF CHAR;    (* obvious *)
  242.     RealName*:         ARRAY bc.LenRealName OF CHAR;
  243.     Group*:            ARRAY bc.LenGroup + 1 OF CHAR;
  244.     GeoLocation*:      ARRAY bc.LenGeoLocation OF CHAR;
  245.     Country*:          ARRAY bc.LenCountry + 1 OF CHAR;
  246.     PhoneNumber*:      ARRAY bc.LenPhoneNumber OF CHAR;
  247.     Password*:         ARRAY bc.LenPassword + 1 OF CHAR;
  248.     (* not encrypted, as if i did encrypt it some bugger would write a password hacker *)
  249.     ComputerType*:     ARRAY bc.LenComputerType OF CHAR;
  250.     (* sentby string, new for release A9 *)
  251.     SentBy*:           ARRAY bc.LenSentBy + 1 OF CHAR;
  252.     (* note: this is a string, not a number! *)
  253.     ConfAcsDataFile*:  ARRAY bc.LenConfAccessFile OF CHAR;
  254.     (* filename pointer to data for the access to conferences
  255.        we look in HBBS:System/Data/ConfAcs for the above filename
  256.        note: this might be blank, if so the confjoiner program must
  257.        check the access level of the conference the user wants to join
  258.        this file is normally only used to disable/enable access to conferences
  259.        without changing their access levels (which would enable more Acs#? commmands *)
  260.     LeechAcsDataFile*: ARRAY bc.LenLeechAccessFile + 1 OF CHAR;
  261.     (* we look HBBS:System/Data/LeechAcs for the above filename *)
  262.  
  263.     (*below are the value the nuker should play with and all the doors
  264.       should actually use to figure out stuff like weektops/conf tops/charts *)
  265.     UploadBytes*: LONGINT;
  266.     UploadFiles*: LONGINT;
  267.     DownloadBytes*: LONGINT;
  268.     DownloadFiles*: LONGINT;
  269.     (* these numbers below are the ACTUAL amount of bytes the user has transfered
  270.       via file transfer protocol, no door should EVER change the values
  271.       in these variables, treats them as they were readonly
  272.       they should be used for programs that work out the amount of bytes that
  273.       have been uploaded to the system in a year, how many bytes have been nuked... *)
  274.     ActualUploadBytes-: LONGINT;
  275.     ActualUploadFiles-: LONGINT;
  276.     ActualDownloadBytes-: LONGINT;
  277.     ActualDownloadFiles-: LONGINT;
  278.     (* dates for last upload and when the user last called great for spotting
  279.        users who have uploaded loads and then turned into a leech
  280.        also so that doors can work out how many days since user last uploaded
  281.        great for creating list of lamers...
  282.        you could write a door that tell the user their account will expire in
  283.        n days if they do not upload ! cool ! *)
  284.     LastUploadDate*: LONGINT;
  285.     LastCalledDate*: LONGINT;
  286.     (* some vars for bulletin/top chart maker! :-) hope this helps! *)
  287.     BestCPSUp*: LONGINT;
  288.     BestCPSDown*: LONGINT;
  289.     CallsMade*: LONGINT;
  290.     PagesMade*: LONGINT;
  291.     MessagesWritten*: LONGINT;
  292.     BytesRatio*: LONGINT; (* as in N:1 *)
  293.     FilesRatio*: LONGINT;
  294.     LastConf*: LONGINT;   (* last conf user was in when they logged off *)
  295.     PreferedConf*: LONGINT; (* users prefered conference, if this is not
  296.                    set to 0 then join this conference instead of the
  297.                    conference the user was last in
  298.                    conference joiner must check that this is a valid
  299.                    conf number and that the user has access to it
  300.                    before joining it upon login *)
  301.     LinesPerScreen*: LONGINT; (* obvious *)
  302.     Protocol*: LONGINT;     (* number of protocol to use, if set to 0 then the BBS
  303.                    will ask the user what protocol the user whishes to use
  304.                    for EVERY transfer *)
  305.     Editor*: LONGINT;       (* same as above except for editing text files *)
  306.     ScreenType*: LONGINT;   (* use for enabling/disabling ansi color *)
  307.     (* number of TimeAccess to use, define when a user can or can't login
  308.        looks in HBBS:System/Data/TimeAcs for this file
  309.        note: match this to the name in the BBSGlobal^.TimeAcsList
  310.        node's name field rather than loading each time as all access
  311.        data is loaded at control startup time *)
  312.     TimeAccessFile*: ARRAY bc.LenTimeAccess + 1 OF CHAR;
  313.   (* if set, will be added to the time allowed on-line, which is defined for each level *)
  314.     ExtraTimeLimit*: LONGINT; 
  315.     ExtraBytesLimit*: LONGINT; (* same for download bytes *)
  316.     ExtraCallsLimit*: LONGINT; (* same for call in one day *)
  317.     ExtraChatLimit*: LONGINT;  (* same for chat time *)
  318.     BytesAllowed*: LONGINT;    (* amount of bytes user is allowed to download *)
  319.     TimeAllowed*: LONGINT;     (* amount of time allowed in one day *)
  320.     ChatAllowed*: LONGINT;     (* amount of chat time allowed in one day *)
  321.     CallsAllowed*: LONGINT;    (* amount of calls in one day *)
  322.     TimeUsed*: LONGINT;        (* time used today *)
  323.     BytesUsed*: LONGINT;       (* amount of bytes downloaded today *)
  324.     CallsUsed*: LONGINT;       (* amount of calls made today *)
  325.     ChatUsed*: LONGINT;        (* chat made today *)
  326.     UserType*: CHAR;           (* set to UserTypeNormal or UserTypeExpert *)
  327.     Language*: LONGINT;        (* Number of languageName/Extn to be used *)
  328.     END;
  329.  
  330.     NodeUserPtr* = UNTRACED POINTER TO NodeUser;
  331.     NodeUser* = STRUCT
  332.     valid*: BOOLEAN; (* if there is no user on-line this will be set to LFALSE *)
  333.     NormalData*: UserData; (* the user data is loaded here first *)
  334.     (* then copied to here, and THIS is the data most of your doors/programms
  335.        should use to determine access and stuff as the sysop might want to
  336.        override the access level settings for the call *)
  337.     CallData*: UserData;
  338.     TimeAcs*: TimeAccessDataPtr; (* only point to TimeAccessData already loaded *)
  339.     Acs*: AccessData;
  340.      (* current access settings (dependant on conference, node, and normal in that order) *)
  341.     ConfAcs*: ConfAcsData; (* set up when user logs in *)
  342.     FilesUploaded*: LONGINT;  (* during this logon *)
  343.     FilesDownloaded*: LONGINT;
  344.     BytesUploaded*: LONGINT;
  345.     BytesDownloaded*: LONGINT;
  346.     PagesMade*: LONGINT;
  347.     NukedFiles*: LONGINT; (* the amount of files other that the user has nuked *)
  348.     MsgsRead*: LONGINT;
  349.     MsgsWritten*: LONGINT;
  350.     END;
  351.  
  352.     (* all messages sent to a CONTROL/NODE/DOOR program must contain these variables
  353.        so we know what's happening (and to aid message trace program)... *)
  354.     (* note: always the case in Oberon :-) *)
  355.     NodeMsgPtr* = UNTRACED POINTER TO NodeMsg;
  356.     NodeMsg* = STRUCT (message*: e.Message)
  357.     MsgType*: LONGINT;
  358.     NodeNum*: LONGINT;
  359.     END;
  360.  
  361.     (* sent between from a node to the control program *)
  362.     StatusMsg* = STRUCT (message*: NodeMsg)
  363.     Status*: LONGINT;
  364.     END;
  365.  
  366.     (* message sent FROM a node to the control program *)
  367.     RequestMsg* = STRUCT (message*: NodeMsg)
  368.     Flags*: LONGINT;
  369.     END;
  370.  
  371.     (* used for communication between a door and a node *)
  372.     DoorIOMessage* = STRUCT (message*: NodeMsg)
  373.     Status*: LONGINT;
  374.     Data*: e.STRPTR;   (* null terminated string *)
  375.     DataLength*: LONGINT; (* string length *)
  376.     Flags*: LONGINT;
  377.     ReturnVal*: LONGINT;
  378.     OptionStr*: e.STRPTR;
  379.     Num1*: LONGINT;
  380.     Num2*: LONGINT;
  381.     END;
  382.  
  383.     (* tells the node when a door has started and when one has stopped *)
  384.     DoorActivityMsg* = STRUCT (message*: NodeMsg)
  385.     Status*: LONGINT;
  386.     END;
  387.  
  388.     DoorDataPtr* = UNTRACED POINTER TO DoorData;
  389.     DoorData* = STRUCT (node*: e.Node)
  390.     DoorPort*: e.MsgPortPtr;
  391.     ReplyPort*: e.MsgPortPtr;
  392.     DoorPortName*: ARRAY 20 OF CHAR;
  393.     SystemOptions*: e.STRPTR;
  394.     END;
  395.  
  396.     TimerDataPtr* = UNTRACED POINTER TO TimerData;
  397.     TimerData* = STRUCT (node*: e.Node)
  398.     TR*: Timer.TimeRequest;
  399.     END;
  400.  
  401.     TimerSetupDataPtr* = UNTRACED POINTER TO TimerSetupData;
  402.     TimerSetupData* = STRUCT
  403.     TimerPort*: e.MsgPortPtr;
  404.     BlankTimerIO*: Timer.TimeRequestPtr;
  405.     TimerList*: e.ListPtr;
  406.     TimerOpen*: e.LONGBOOL;
  407.     END;
  408.  
  409.     NodeDataPtr* = UNTRACED POINTER TO NodeData;
  410.     NodeData* = STRUCT (node: e.Node)    (* for passing to list and for the ctrlwnd list view *)
  411.     Status*: LONGINT;                (* public *)
  412.     NodeNum*: LONGINT;
  413.     AutoStart: e.LONGBOOL;          (* private *)
  414.     (* port name for node, used to ask the node program stuff by doors *)
  415.     PortName*: ARRAY 14 OF CHAR;
  416.     DoorStartPortName: ARRAY 26 OF CHAR; (* private *)
  417.     NodePort,
  418.     ReplyPort,
  419.     ConRPort,
  420.     ConWPort,
  421.     SerPort: e.MsgPortPtr; (* all private *)
  422.     ConRead,
  423.     ConWrite: e.IOStdReqPtr;
  424.     SerRead,
  425.     SerWrite: Serial.IOExtSerPtr; (* private stuff *)
  426.     NodeTimer : TimerSetupDataPtr;
  427.     ConScr: Intuition.ScreenPtr;
  428.     ConWin,
  429.     NodeWnd,
  430.     InfoWnd,
  431.     SettingsWnd: Intuition.WindowPtr;
  432.     ConX, ConY, ConW, ConH, NodeX, NodeY: LONGINT;
  433.     SettingsOpen*: e.LONGBOOL;       (* public *)
  434.     InformationOpen*: e.LONGBOOL;
  435.     WindowTitle: ARRAY 90 OF CHAR;   (* private *)
  436.     (* public: will be set to true if console window for node is open *)
  437.     ConOk*: e.LONGBOOL;
  438.     SerOk: e.LONGBOOL;
  439.     SerOPEN: e.LONGBOOL;
  440.     ConBuffer: e.STRPTR;
  441.     ConBufferLen: LONGINT;
  442.     ConBytes: LONGINT;
  443.     SerBuffer: e.STRPTR;
  444.     SerBufferLen: LONGINT;
  445.     SerBytes: LONGINT;
  446.     IBuffer: e.STRPTR;
  447.     IBytes: LONGINT;
  448.     SerWaiting: e.LONGBOOL;
  449.     ConWaiting: e.LONGBOOL;
  450.     char1: CHAR;
  451.     csistring: ARRAY 256 OF CHAR;
  452.     TimerSig,
  453.     SerSig,
  454.     InfoWinSig,
  455.     SettingsWinSig,
  456.     ConSig,
  457.     ConWinSig,
  458.     PortSig,
  459.     WinSig: LONGINT;
  460.     (* public: after you call DOORGetLine this contain the string that was typed *)
  461.     CurrentLine*: e.STRPTR;
  462.     (* public: after you call DOORGetLine with a GlLineWrap flag this may
  463.        contain some data if the user was in the middle or writing a word
  464.        see the LineEditor for an example of it's usage *)
  465.     CurrentLineWrap*: e.STRPTR;
  466.     LoginType*: LONGINT; (* default to LoginNone *)
  467.     NodeFlags*: LONGSET;
  468.     RequestShutdown: e.LONGBOOL;
  469.     (* public: actual path of the NODEx directory, path setting, should be
  470.        initialised by Control, MUST an WILL always have a trailing : or / *)
  471.     NodeLocation*: e.STRPTR;
  472.     (* public: options from the device file *)
  473.     NodeDevice*: DeviceData;
  474.     (* public: the following options are defined in the nodeglobal or nodelocal files *)
  475.     NodeSettings*: NodeSettingsData;
  476.     (* public: info about the user who's online,
  477.        check NnD^.User.Valid before accessing any more data ! in the structure *)
  478.     User*: NodeUser;
  479.     DoorsRunning: LONGINT;
  480.     (* public: pointer to doordata structure of the active door, most of the
  481.        time will point to some door of somekind *)
  482.     ActiveDoor*: DoorDataPtr;
  483.     DoorReturn: ARRAY bc.LenMaxDoorReturn OF CHAR;
  484.     (* public: as the door has the ability to spawn another door we need to keep
  485.         track of the loaded doors, and the order in which we ran them *)
  486.     DoorList*: e.ListPtr;
  487.     (* public: pointer to conference that user is in, warning: might be NIL *)
  488.     CurrentConf*: ConfDataPtr;
  489.     (* Acs: AccessData; *)
  490.     ConnectBaud*: ARRAY bc.MaxCPSBaudLen + 1 OF CHAR; (* public *)
  491.     Action*: ARRAY bc.MaxActionLen OF CHAR; (* public, used by Who door *)
  492.     TransferringFile*: e.LONGBOOL;
  493.     (* public readable and door setable: if a user is on-line, it will be
  494.        set to OsOnline, otherwise it will be set to OsOffline, this variable
  495.        is used by the node program to determine wether or not continue running
  496.         the next door in the sequence or to reset the node *)
  497.     OnlineStatus*: e.LONGBOOL;
  498.     LastCallers*,
  499.     LastUploads*,
  500.     LastDownloads*,
  501.     LastPagers*,
  502.     LastPWFails*,
  503.     LastCarrier*: e.ListPtr;
  504.     MaxLastCallers*,
  505.     MaxLastUploads*,
  506.     MaxLastDownloads*,
  507.     MaxLastPagers*,
  508.     MaxLastPWFails*,
  509.     MaxLastCarrier*: LONGINT;
  510.     CurrentLastCallers*,
  511.     CurrentLastUploads*,
  512.     CurrentLastDownloads*,
  513.     CurrentLastPagers*,
  514.     CurrentLastPWFails*,
  515.     CurrentLastCarrier*: LONGINT;
  516.     (* list of tagged files that's saved and reloaded by the node program, when
  517.        a user logs off and logs on respectively *)
  518.     TaggedFileList*: e.ListPtr;
  519.     TaggedFiles*: LONGINT; (* number of tagged files *)
  520.     (* when a user is not in a conference then this is gained from
  521.        NnD^.NodeSettings.MaxDIZLines, otherwise it copied from
  522.        NnD^.CurrentConf^.MaxDIZLines *)
  523.     MaxDIZLines*: LONGINT;
  524.     DoorContinue*: e.LONGBOOL;
  525.     AllowLogins*: e.LONGBOOL;
  526.     (* fill this with the characters you want the user to be able to use
  527.        when using DOORGetLine and specify GlUseChars as one of the flags
  528.        and when a user presses a key that's not in this string a BEEP will
  529.         be sent to their system and the key will not be added to te current line *)
  530.     CharsAllowed*: e.STRPTR;
  531.     CallsToday*: LONGINT;
  532.     OLMList*: e.ListPtr;
  533.     OLMCount*: LONGINT; (* see also NflgOLMWaiting and OLMNode *)
  534.     (* send a message to this port to make the bbs check for OLMs *)
  535.     OLMPort*: e.MsgPortPtr;
  536.     (* array of actions, check out the Act#? definitions, basically it is set
  537.        to a string full of spaces upon node initialisation and then actions are
  538.        set if users run particular types of door, this is SOOOO handy for writing
  539.        lastcallers door, this information is also written to the callers log when
  540.        a user logs off *)
  541.     Actions*: ARRAY bc.LenActions + 1 OF CHAR;
  542.     (* for setting colours of stuff like menu's etc... *)
  543.     BBSCols*: BBSColsDataPtr;
  544.     LastCalledDate*: ARRAY bc.LenDateStr OF CHAR;
  545.     LastCalledTime*: ARRAY bc.LenTimeStr OF CHAR;
  546.     DoorLogOverride: e.LONGBOOL;
  547.     END;
  548.  
  549.     TaggedFilePtr* = UNTRACED POINTER TO TaggedFile;
  550.     TaggedFile* = STRUCT (node*: e.Node) (* node^.name is the name that's tagged *)
  551.     ConferenceNum*: LONGINT;   (* the number of the conference that the file is in *)
  552.     (* size of the file (must be filled in or set to 0, this is used to determine
  553.        if the user has enough creds to d/l and will be added to their bytes
  554.        uploaded/downloaded total *)
  555.     FileSize*: LONGINT;
  556.     (* if LTRUE then bytes will be added to the ActualDownload#? and Download#?,
  557.        if false then bytes will only be added to ActualDownload#?
  558.        (i.e user does not loose creds if a non warez file) *)
  559.     WarezFile*: e.LONGBOOL;
  560.     END;
  561.  
  562.     (* config files are read into memory and line by line are loaded into a linked
  563.        list of items and parameters, then to get a config option all we have to do
  564.        is search the linked list of items for a matching item name and return the
  565.        params in a desired format, this works out much quicker than loading the config
  566.        into memory and parsing it everytime you want an option (which is how i did it
  567.        to start with) it's only when you try running on a (lame) A500 that you realize
  568.        how slow it is to read in about 50-60 options when you start a node using the
  569.        older method ! *)
  570.     CfgItemDataPtr* = UNTRACED POINTER TO CfgItemData;
  571.     CfgItemData* = STRUCT (node*: e.Node) (* node^.name contain item name *)
  572.     Params*: e.STRPTR; (* params contain the string of the parameter... *)
  573.     END;
  574.  
  575.     CfgFileDataPtr* = UNTRACED POINTER TO CfgFileData;
  576.     CfgFileData* = STRUCT
  577.     ItemList*: e.ListPtr; (* list of CfgItemDataPtr nodes *)
  578.     filename*: e.STRPTR;
  579.     END;
  580.     (* because of the way HBBS data is stored in memory via linked variables ANY
  581.        program can access ALL DATA of the bbs and all of it's nodes at any time
  582.        just by getting a pointer to the following structure... *)
  583.  
  584.     ProtocolNodePtr* = UNTRACED POINTER TO ProtocolNode;
  585.     ProtocolNode* = STRUCT (node*: e.Node) (* node^.name if Protocol name *)
  586.     protocoltype*: LONGINT; (* pTypeBidirectional or pTypeUnidirectional *)
  587.     modulename*: e.STRPTR;  (* name of door module to run *)
  588.     moduleopts*: e.STRPTR;  (* door options supplied to protocol module door *)
  589.     allowUl*: e.LONGBOOL;   (* you can specify a protocol is only availiable for *)
  590.     allowDl*: e.LONGBOOL;   (* upload or download or both! *)
  591.     allowBatch*: e.LONGBOOL;(* allow transfer of more than one file *)
  592.     END;
  593.  
  594.     BBSGlobalDataPtr* = UNTRACED POINTER TO BBSGlobalData;
  595.     BBSGlobalData* = STRUCT
  596.     NodeGlobalData: NodeDataPtr;
  597.     NodeList: e.ListPtr;
  598.     CtrlMainPort, CtrlMainReplyPort: e.MsgPortPtr;
  599.     TimesList: e.ListPtr;
  600.     ScreenInfo: ScreenInfoData;
  601.     (* settings for bbs, all structures are sub structures of this... *)
  602.     (* public: linked list of all conference data (ConfDataPtr) *)
  603.     ConfList*: e.ListPtr;
  604.     (* public: amount of conferences (active or not) (initialised by Control) *)
  605.     Conferences*: LONGINT;
  606.     (* public: linked list of TimeAcs's (TimeAccessDataPtr) *)
  607.     TimeAcsList*: e.ListPtr;
  608.     (* public: amount of TimeAcs's loaded *)
  609.     TimeAccesses*: LONGINT;
  610.     (* public: list of access levels *)
  611.     (* node^.name contain a string of the access level number *)
  612.     AcsLevelList*: e.ListPtr;    
  613.     (* node^.name contain a string of the access level name *)
  614.     AcsLevelNames*: e.ListPtr;   
  615.     (* node^.name contain a string of the name of the default
  616.        conference access level settings file *)
  617.     AcsLeveConfAcsDef: e.ListPtr;
  618.     AcsLevels*: LONGINT;   (* public: amount of access levels *)
  619.     TotalUsers-: LONGINT;  (* read only: amount of users in the user database *)
  620.     ErrorLogFile*: e.STRPTR;
  621.     BBSNodes*: LONGINT;
  622.     BBSName*: e.STRPTR;
  623.     BBSSerial*: e.STRPTR;
  624.     BBSLocation*: e.STRPTR;
  625.     BBSCountry*: e.STRPTR;
  626.     BBSGroup*: e.ListPtr;
  627.     SysopAccount*: e.STRPTR;
  628.     Drive*: e.ListPtr;
  629.     BBSDrive*: e.STRPTR;
  630.     MinFreeSpace*: LONGINT;
  631.     NoFreeSpaceScript*: e.STRPTR;
  632.     ButtonName*: e.ListPtr;
  633.     ButtonCMD*: e.ListPtr;
  634.     HideScreen*: e.LONGBOOL;
  635.     UserDataFileName*: e.STRPTR;
  636.     NewUserAccessLevel*: LONGINT;
  637.     MaxUsernameAttempts*: LONGINT;
  638.     MaxPasswordAttempts*: LONGINT;
  639.     MinPasswordLength*: LONGINT;
  640.     NewUserConf*: LONGINT;  (* found in HBBS:Conferences/ConfList *)
  641.     LastUserNum-: LONGINT;  (* readonly: userid of the last user added to the system *)
  642.     LanguageName*: e.ListPtr;
  643.     LanguageExtn*: e.ListPtr;
  644.     Languages*: LONGINT;
  645.     ProtocolList*: e.ListPtr; (* list of protocol information *)
  646.     Protocols*: LONGINT;      (* amount of protocols loaded *)
  647.     EditorCMD*: e.STRPTR;     (* program to be used for editing text files ! *)
  648.     LastCalledDate*: ARRAY bc.LenDateStr OF CHAR;
  649.     LastCalledTime*: ARRAY bc.LenTimeStr OF CHAR;
  650.     CallsToday*: LONGINT;     (* saved in file HBBS:System/Data/Calls.CFG *)
  651.     CopyBufferSize*: LONGINT;
  652.     CallsEver-: LONGINT;  (* total amount of calls bbs has received *)
  653.     END;
  654.  
  655.     (* an OLM door should check for the AccessLevel AcsAllowOLM before a user is
  656.        allowed to send an OLM... this is not part of HBBSAddOLM as you might want
  657.        other doors to send OLM's (e.g LogonAnnounce doors...)
  658.        OLM stand for OnLine Message *)
  659.     OLMNodePtr* = UNTRACED POINTER TO OLMNode;
  660.     (* node^.name contain the message, null terminated string
  661.        it *CAN* have \n's in it...*)
  662.     OLMNode* = STRUCT (node*: e.Node) 
  663.     (* handle of the user who sent the olm handle does not have to be valid
  664.        but if you want to reply to an OLM then you MUST check to see if it's valid..
  665.        reason: announce doors don't have handles *)
  666.     Handle*: ARRAY bc.LenHandle + 1 OF CHAR;
  667.     Time*: ARRAY bc.LenTimeStr OF CHAR; (* time olm was sent is added here... *)
  668.     Date*: ARRAY bc.LenDateStr OF CHAR; (* date olm was sent is added here... *)
  669.     FromPRG*: ARRAY bc.LenHandle OF CHAR; (* name of the program that sent the door *)
  670.     FromNode*: LONGINT; (* 0 for external program, or a NnD^.NodeNum+1 *)
  671.     END;
  672.  
  673. END BBSStructures.
  674.  
  675.